package com.caifu.util;

import com.baidu.aip.face.AipFace;

/**
 * ClassName : BaiduClientSingleton
 *
 * @author :  yb
 * @description ： 创建百度链接
 * @date : 2020-09-23 10:59
 */
public class BaiduClient {

    private static volatile AipFace client;

    private BaiduClient(){

    }

    public static AipFace getBaiduClient(){
        if (client == null) {
            synchronized (BaiduClient.class) {
                if (client == null) {
                    client = new AipFace(BaiduFaceUtils.BD_FACE_APP_ID, BaiduFaceUtils.BD_FACE_API_KEY, BaiduFaceUtils.BD_FACE_SECRET_KEY);
                }
            }
        }
        return client;
    }

}
